<%@ page import="java.util.List"%>
<%@ page import="gmusic.bo.QueryBean"%>

<jsp:include page="include/entete.jsp" flush="true">
	<jsp:param name="titre" value="GMusic v4.0" />
	<jsp:param name="sousTitre" value="Queries" />
</jsp:include>

<%
	List<QueryBean> queries = (List<QueryBean>) session
			.getAttribute("queriesList");

	String[] ligneCouleur = new String[] { "ligne2", "ligne1" };
%>

<div class="table">
<table width="100%" border="0">
	<thead>
		<tr class="thead">
			<th colspan="2">Liste des queries</th>
		</tr>
		<tr class="thead">
			<th>Code</th>
			<th>Description</th>
		</tr>
	</thead>
	<tfoot>
		<tr class="tfoot">
			<td colspan="2"><%=queries.size()%> enregistrement(s)</td>
		</tr>
	</tfoot>
	<tbody>
		<%
			for (int i = 0; i < queries.size(); i++) {
		%>
		<tr class="<%=ligneCouleur[i % 2]%>">
			<td align="center"><a
				href="ExecuteQuery.gm?code=<%=queries.get(i).getCode()%>"><%=queries.get(i).getCode()%></a></td>
			<td><%=queries.get(i).getDescription()%></td>
		</tr>
		<%
			}
		%>
	</tbody>
</table>
</div>

<jsp:include page="include/piedPage.jsp" flush="true" />